

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  
    <meta name="description" content="@[toc] 参考资料 Redis 安装 | 菜鸟教程 一、Redis概述 Redis 官网 Redis 全称为 REmote DIctionary Server，直译为远程字典服务器，是由 Salvatore Sanfilippo（一位来自意大利的计算机领域学者&gt;&gt;查看详情&lt;&lt;)  写的 key-value 存储系统，是跨平台的非关系型数据库。 Redis 是一个开源的使">
<meta property="og:type" content="article">
<meta property="og:title" content="Redis 笔记1 安装以及基本使用">
<meta property="og:url" content="http://example.com/2022/01/07/Redis%20%E7%AC%94%E8%AE%B01%20%E5%AE%89%E8%A3%85%E4%BB%A5%E5%8F%8A%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="@[toc] 参考资料 Redis 安装 | 菜鸟教程 一、Redis概述 Redis 官网 Redis 全称为 REmote DIctionary Server，直译为远程字典服务器，是由 Salvatore Sanfilippo（一位来自意大利的计算机领域学者&gt;&gt;查看详情&lt;&lt;)  写的 key-value 存储系统，是跨平台的非关系型数据库。 Redis 是一个开源的使">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img-blog.csdnimg.cn/d287943be2b041d195bc9dd1c60bd62d.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/45d7ea6d85fe4abab6b1353a8b9b6897.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/a6307294fde74c7da67fd64f30aad7ca.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/c6c0aacd8fbd49e5825c190bd69f067f.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/a62c6f2ced3e482989923a23e007dfaf.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/5144bf78b4724af3954d6eed6a30324a.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/821c992e342e4f08b30b5c730b0957ce.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/4fc20470ff5a4d4cb132000f94f974f8.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/9b0dc0b371cf4e9083e200d6126d93d0.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/17b7a6790f5b436688dd7e65837d5e1d.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/64e5a14be55e4641bc1112afb362ebeb.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/1e6af44e18f84790b0a6b56df92d4bee.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/896114e6c6ad4bf296d0355a5a3e6115.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/c5ca1fd01d6b40488e2a8bd43426865c.png#pic_center">
<meta property="article:published_time" content="2022-01-07T02:44:31.000Z">
<meta property="article:modified_time" content="2022-08-22T15:47:53.414Z">
<meta property="article:author" content="John Doe">
<meta property="article:tag" content="Redis">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/d287943be2b041d195bc9dd1c60bd62d.png#pic_center">
  
  
  
  <title>Redis 笔记1 安装以及基本使用 - Hexo</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.2","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 6.2.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>尤 Ni&#39;s Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="Redis 笔记1 安装以及基本使用"></span>
          
        </div>

        
          
  <div class="mt-3">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-author" aria-hidden="true"></i>
        John Doe
      </span>
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2022-01-07 10:44" pubdate>
          2022年1月7日 上午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          2.1k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          18 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Redis 笔记1 安装以及基本使用</h1>
            
              <p class="note note-info">
                
                  
                    本文最后更新于：1 小时前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <p>@[toc]</p>
<h1 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h1><hr>
<p><a target="_blank" rel="noopener" href="https://www.runoob.com/redis/redis-install.html">Redis 安装 | 菜鸟教程</a></p>
<h1 id="一、Redis概述"><a href="#一、Redis概述" class="headerlink" title="一、Redis概述"></a>一、Redis概述</h1><hr>
<p><a target="_blank" rel="noopener" href="https://redis.io/">Redis 官网</a></p>
<p>Redis 全称为 REmote DIctionary Server，直译为远程字典服务器，是由 Salvatore Sanfilippo（<em>一位来自意大利的计算机领域学者<a target="_blank" rel="noopener" href="http://invece.org/">&gt;&gt;查看详情&lt;&lt;</a>)</em>  写的 key-value 存储系统，是跨平台的非关系型数据库。</p>
<p>Redis 是一个开源的使用 ANSI C 语言编写、遵守 BSD 协议、支持网络、可基于内存、分布式、可选持久性的键值对(Key-Value)存储数据库，并提供多种语言的 API。</p>
<p>Redis 通常被称为数据结构服务器，因为值（value）可以是字符串(String)、哈希(Hash)、列表(list)、集合(sets)和有序集合(sorted sets)等类型。</p>
<p>基本数据结构</p>
<ul>
<li>String: 字符串</li>
<li>Hash: 散列</li>
<li>List: 列表</li>
<li>Set: 集合</li>
<li>Sorted Set: 有序集合</li>
</ul>
<h1 id="二、Windows下安装-Redis"><a href="#二、Windows下安装-Redis" class="headerlink" title="二、Windows下安装 Redis"></a>二、Windows下安装 Redis</h1><hr>
<h2 id="2-1-下载解压-Redis"><a href="#2-1-下载解压-Redis" class="headerlink" title="2.1 下载解压 Redis"></a>2.1 下载解压 Redis</h2><p><a target="_blank" rel="noopener" href="https://github.com/tporadowski/redis/releases">Redis Github 下载地址</a>下载zip压缩包</p>
<p><img src="https://img-blog.csdnimg.cn/d287943be2b041d195bc9dd1c60bd62d.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>解压之后， 共有16个文件<br><img src="https://img-blog.csdnimg.cn/45d7ea6d85fe4abab6b1353a8b9b6897.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h2 id="2-2-配置Redis的系统环境变量"><a href="#2-2-配置Redis的系统环境变量" class="headerlink" title="2.2 配置Redis的系统环境变量"></a>2.2 配置Redis的系统环境变量</h2><p>配置目的：将Redis文件位置存储到环境变量里，这样只要打开cmd命令行，就能定位到Redis的位置，从而使用相关的命令。</p>
<p>配置方法：右键”此电脑”，点击属性 -&gt;  高级系统设置 -&gt; 环境变量 </p>
<p>(1) 设置REDIS_HOME<br><img src="https://img-blog.csdnimg.cn/a6307294fde74c7da67fd64f30aad7ca.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>(2) 配置好Redis位置目录后，需要配置Path系统变量</p>
<p><img src="https://img-blog.csdnimg.cn/c6c0aacd8fbd49e5825c190bd69f067f.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>(3) 打开Path后，添加REDIS_HOME，添加的变量格式为：</p>
<figure class="highlight gcode"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs gcode"><span class="hljs-meta">%</span>REDIS_HOME<span class="hljs-meta">%</span>\<br></code></pre></td></tr></table></figure>

<p><img src="https://img-blog.csdnimg.cn/a62c6f2ced3e482989923a23e007dfaf.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>至此，Redis环境变量，配置完毕</p>
<h2 id="2-3-启动测试Redis"><a href="#2-3-启动测试Redis" class="headerlink" title="2.3 启动测试Redis"></a>2.3 启动测试Redis</h2><h3 id="2-3-1-启动-Redis-服务端"><a href="#2-3-1-启动-Redis-服务端" class="headerlink" title="2.3.1 启动 Redis 服务端"></a>2.3.1 启动 Redis 服务端</h3><p>Win + R 快捷键 输入cmd 打开命令提示符，输入redis的启动命令 (默认配置) </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">redis-server.exe<br></code></pre></td></tr></table></figure>

<p>若弹出防火墙警告，点击允许<br><img src="https://img-blog.csdnimg.cn/5144bf78b4724af3954d6eed6a30324a.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>启动成功后<br><img src="https://img-blog.csdnimg.cn/821c992e342e4f08b30b5c730b0957ce.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>通过启动信息可以观察到，Redis 默认启动模式为 <code>standalone</code> 独立集群，默认端口号为<code>6379</code></p>
<p>启动后，若要保持服务则不能关闭终端，因为它现在是作为Redis的服务端</p>
<h3 id="2-3-2-启动-Redis-客户端"><a href="#2-3-2-启动-Redis-客户端" class="headerlink" title="2.3.2 启动 Redis 客户端"></a>2.3.2 启动 Redis 客户端</h3><p>在保持服务端终端的运行前提下，另开一个终端，输入以下命令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">redis-cli.exe -h 127.0.0.1 -p 6379<br></code></pre></td></tr></table></figure>
<p>表示启动一个Redis客户端去连接 IP 地址为 127.0.0.1 即本机，端口号为6379的一个Redis服务端</p>
<p>在客户端输入以下两条命令进行测试</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell">set testKey uni<br><br>get testKey<br></code></pre></td></tr></table></figure>
<p><img src="https://img-blog.csdnimg.cn/4fc20470ff5a4d4cb132000f94f974f8.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>至此，Windows系统下Redis的安装与测试已完毕。</p>
<h1 id="三、CentOS7系统下安装Redis"><a href="#三、CentOS7系统下安装Redis" class="headerlink" title="三、CentOS7系统下安装Redis"></a>三、CentOS7系统下安装Redis</h1><h2 id="3-1-下载解压-Redis"><a href="#3-1-下载解压-Redis" class="headerlink" title="3.1 下载解压 Redis"></a>3.1 下载解压 Redis</h2><p>下载地址：<a target="_blank" rel="noopener" href="https://download.redis.io/releases/redis-6.2.6.tar.gz">https://download.redis.io/releases/redis-6.2.6.tar.gz</a></p>
<p>在CentOS7下的话直接用命令行就行了</p>
<p>下载Redis资源包</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo wget https://download.redis.io/releases/redis-6.2.6.tar.gz<br></code></pre></td></tr></table></figure>

<p>解压到指定位置</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo tar -zxvf ./redis-6.2.6.tar.gz -C 保存的位置目录<br></code></pre></td></tr></table></figure>
<p>赋予用户对目录的权限</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo chown -R 用户名 Redis目录<br></code></pre></td></tr></table></figure>
<p>解压后<br><img src="https://img-blog.csdnimg.cn/9b0dc0b371cf4e9083e200d6126d93d0.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h2 id="3-2-编译项目"><a href="#3-2-编译项目" class="headerlink" title="3.2 编译项目"></a>3.2 编译项目</h2><p>接下来使用make命令进行编译</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">make MALLOC=libc<br></code></pre></td></tr></table></figure>
<p>但可能会出现报错，比如：</p>
<p><img src="https://img-blog.csdnimg.cn/17b7a6790f5b436688dd7e65837d5e1d.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>该提示表示系统缺少gcc环境，安装一下即可</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo yum -y install gcc automake autoconf libtool make<br></code></pre></td></tr></table></figure>
<p>安装完毕<br><img src="https://img-blog.csdnimg.cn/64e5a14be55e4641bc1112afb362ebeb.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>接着在 Redis根目录下使用 make 命令 ，编译 Redis 资源</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">make MALLOC=libc<br></code></pre></td></tr></table></figure>

<p><img src="https://img-blog.csdnimg.cn/1e6af44e18f84790b0a6b56df92d4bee.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h2 id="3-3-配置环境变量"><a href="#3-3-配置环境变量" class="headerlink" title="3.3 配置环境变量"></a>3.3 配置环境变量</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">vim ~/.bashrc<br></code></pre></td></tr></table></figure>
<p>在首行添加以下内容，不能有多余的空格</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs shell">export REDIS_HOME=/opt/module/redis-6.2.6<br>export PATH=$PATH:$REDIS_HOME/src<br></code></pre></td></tr></table></figure>

<p>使配置生效</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">source ~/.bashrc<br></code></pre></td></tr></table></figure>

<h2 id="3-4-启动测试"><a href="#3-4-启动测试" class="headerlink" title="3.4 启动测试"></a>3.4 启动测试</h2><p>服务端：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">redis-server $REDIS_HOME/redis.conf<br></code></pre></td></tr></table></figure>
<p><img src="https://img-blog.csdnimg.cn/896114e6c6ad4bf296d0355a5a3e6115.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>新开终端，客户端：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">redis-cli<br></code></pre></td></tr></table></figure>
<p>不配置 -h 和 -p的话将使用默认的本机和6379</p>
<p><img src="https://img-blog.csdnimg.cn/c5ca1fd01d6b40488e2a8bd43426865c.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>至此，已完成 CentOS系统中Redis的安装、配置与测试</p>
<h1 id="四、收获与总结"><a href="#四、收获与总结" class="headerlink" title="四、收获与总结"></a>四、收获与总结</h1><hr>
<p>Redis是REmote Dictionary  Server的缩写，（即远程字典服务器)，是基于ANSI C语言开发的一种非关系型数据库，是通过键值对存储的，值多种数据结构，比如String字符串、Hash散列、List列表、Set集合、SortedSet集合。</p>
<p>特点：</p>
<ul>
<li>基于内存</li>
<li>遵守BSD协议<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/BSD%E5%8D%8F%E8%AE%AE/8013651?fr=aladdin">【百度百科】</a></li>
<li>支持分布式</li>
<li>可选持久性</li>
<li>键值对存储</li>
<li>提供多种语言的API</li>
</ul>
<p>关于快速入门</p>
<ul>
<li><code>redis-server</code> 启动服务端 默认服务器地址为 127.0.0.1:6379</li>
<li><code>redis-cli</code> 启动客户端，默认连接127.0.0.1:6379</li>
<li><code>set 键 值</code> 设置一个键值对 、<code>get 键</code> 获取键对应的值</li>
</ul>
<p>通过本次的简单安装与测试，使用到了gcc的make命令编译其源文件，感觉Redis安装还挺方便的，不过对于Redis的配置以及具体使用还需要进一步的学习。</p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/" class="category-chain-item">数据库</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/Redis/">#Redis</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>Redis 笔记1 安装以及基本使用</div>
      <div>http://example.com/2022/01/07/Redis 笔记1 安装以及基本使用/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>John Doe</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2022年1月7日</div>
        </div>
      
      
      <div class="license-meta-item">
        <div>许可协议</div>
        <div>
          
            
            
              <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
              <span class="hint--top hint--rounded" aria-label="BY - 署名">
                <i class="iconfont icon-by"></i>
              </span>
              </a>
            
          
        </div>
      </div>
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/01/07/SpringBoot%20%E7%AC%94%E8%AE%B02%20SpringBoot%E6%95%B4%E5%90%88Junit%E6%A1%86%E6%9E%B6%20_%20%E6%95%B4%E5%90%88Redis%20_%20%E6%95%B4%E5%90%88MyBatis%20_%20%E5%85%A5%E9%97%A8Demo/" title="SpringBoot 笔记2 SpringBoot整合Junit框架 _ 整合Redis _ 整合MyBatis _ 入门Demo">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">SpringBoot 笔记2 SpringBoot整合Junit框架 _ 整合Redis _ 整合MyBatis _ 入门Demo</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2022/01/06/SpringBoot%20%E7%AC%94%E8%AE%B01%20SpringBoot%20%E6%A6%82%E8%BF%B0%E3%80%81%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8%E3%80%81%E8%B5%B7%E6%AD%A5%E4%BE%9D%E8%B5%96%E5%8E%9F%E7%90%86%E5%88%86%E6%9E%90%E3%80%81%E5%85%A5%E9%97%A8%E7%BA%A7%E9%85%8D%E7%BD%AE/" title="SpringBoot 笔记1 SpringBoot 概述、快速入门、起步依赖原理分析、入门级配置">
                        <span class="hidden-mobile">SpringBoot 笔记1 SpringBoot 概述、快速入门、起步依赖原理分析、入门级配置</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      headingSelector : CONFIG.toc.headingSelector || 'h1,h2,h3,h4,h5,h6',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      collapseDepth   : CONFIG.toc.collapseDepth || 0,
      scrollSmooth    : true,
      headingsOffset  : -boardTop
    });
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.10/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
